package com.bihu.bihudemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章(Question)表实体类
 *
 * @author makejava
 * @since 2020-07-15 21:15:45
 */
@SuppressWarnings("serial")
@Data
public class Question extends Model<Question> {
    //主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    //文章标题
    private String title;
    //文章描述
    private String description;
    //文章作者
    private String author;
    //作者ID
    private  Integer uid;
    //文章内容
    private Object content;
    //html的content
    private Object contentFormat;
    //阅读量
    private Integer readNum;
    //评论量
    private Integer commentNum;
    //关注数
    private Integer spotNum;
    //点赞数
    private Integer likeNum;
    //封面
    private String cover;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }

    public Object getContentFormat() {
        return contentFormat;
    }

    public void setContentFormat(Object contentFormat) {
        this.contentFormat = contentFormat;
    }

    public Integer getReadNum() {
        return readNum;
    }

    public void setReadNum(Integer readNum) {
        this.readNum = readNum;
    }

    public Integer getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Integer commentNum) {
        this.commentNum = commentNum;
    }

    public Integer getSpotNum() {
        return spotNum;
    }

    public void setSpotNum(Integer spotNum) {
        this.spotNum = spotNum;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}